package com.cl.code.database.mybatis.module.sql.operator;

import lombok.Getter;

/**
 * 模糊匹配符
 *
 * @author chengliang
 * @since 1.0.0
 */
@Getter
public enum FuzzySqlExpression implements SqlExpression {
    LIKE(" #{column} LIKE CONCAT('%',#{value},'%') "),
    START_WITH(" #{column} LIKE CONCAT(#{value},'%') "),
    END_WITH(" #{column} LIKE CONCAT('%',#{value}) "),
    NOT_LIKE(" #{column} NOT LIKE #{value} "),
    ;
    private final String expression;

    FuzzySqlExpression(String expression) {
        this.expression = expression;
    }

}
